package com.fr.report.io;

import com.fr.base.xml.XMLPrintWriter;
import com.fr.base.xml.XMLReadable;
import com.fr.base.xml.XMLableReader;
import java.io.Serializable;

public class ReportExportAttr
  implements XMLReadable, Cloneable, Serializable
{
  private ExcelExportAttr excelExportAttr = new ExcelExportAttr();
  private HTMLExportAttr htmlExportAttr = new HTMLExportAttr();

  public ExcelExportAttr getExcelExportAttr()
  {
    return this.excelExportAttr;
  }

  public void setExcelExportAttr(ExcelExportAttr paramExcelExportAttr)
  {
    this.excelExportAttr = paramExcelExportAttr;
  }

  public void setHtmlExportAttr(HTMLExportAttr paramHTMLExportAttr)
  {
    this.htmlExportAttr = paramHTMLExportAttr;
  }

  public HTMLExportAttr getHtmlExportAttr()
  {
    return this.htmlExportAttr;
  }

  public void readXML(XMLableReader paramXMLableReader)
  {
    if (paramXMLableReader.isChildNode())
    {
      Object localObject;
      if ("ExcelExportAttr".equals(paramXMLableReader.getTagName()))
      {
        localObject = new ExcelExportAttr();
        paramXMLableReader.readXMLObject((Serializable)localObject);
        setExcelExportAttr((ExcelExportAttr)localObject);
      }
      if ("HTMLExportAttr".equals(paramXMLableReader.getTagName()))
      {
        localObject = new HTMLExportAttr();
        paramXMLableReader.readXMLObject((Serializable)localObject);
        setHtmlExportAttr((HTMLExportAttr)localObject);
      }
    }
  }

  public void writeXML(XMLPrintWriter paramXMLPrintWriter)
  {
    paramXMLPrintWriter.startTAG("ReportExportAttr");
    if (getExcelExportAttr() != null)
      getExcelExportAttr().writeXML(paramXMLPrintWriter);
    if (getHtmlExportAttr() != null)
      getHtmlExportAttr().writeXML(paramXMLPrintWriter);
    paramXMLPrintWriter.end();
  }

  public Object clone()
    throws CloneNotSupportedException
  {
    ReportExportAttr localReportExportAttr = (ReportExportAttr)super.clone();
    if (getExcelExportAttr() != null)
      setExcelExportAttr((ExcelExportAttr)getExcelExportAttr().clone());
    if (getHtmlExportAttr() != null)
      setHtmlExportAttr((HTMLExportAttr)getHtmlExportAttr().clone());
    return localReportExportAttr;
  }
}